@extends('hrs.layouts.app')  
@section('css')
        <!-- Custombox css -->
        <link href="{{asset('hrs/plugins/custombox/css/custombox.css')}}" rel="stylesheet">
  
@endsection         
@section('content')

            <div class="container">

                <div class="row">
                    <div class="col-lg-12">
                        <div class="card-box">
                            <div class="row">
                                <div class="col-sm-8">
                                    <form role="form">
                                        <div class="form-group contact-search m-b-30">
                                            <input name="keyword" type="text" id="search" class="form-control" placeholder="提单号/船名/航次" value="{{array_get($where,'keyword')}}" >
                                            <button type="submit" class="btn btn-white"><i class="fa fa-search"></i></button>
                                        </div> <!-- form-group -->
                                    </form>
                                </div>
                                <div class="col-sm-4">
                                     
                                    <a href="{{url('items/create')}}" class="btn btn-primary btn-md waves-effect waves-light m-b-30" 
                                                           ><i class="md md-add"></i>录入单据</a>                                              
                                </div>
                            </div>
                             @if(session('rs'))
                              <div class="alert alert-{{session('rs')['status']}}">
                                {{ session('rs')['msg'] }}
                              </div>
                    @endif
                            <div class="table-responsive">
                                <table class="table table-hover mails m-0 table table-actions-bar">
                                    <thead>
                                        <tr>
                                           
                                            <th>ID</th>
                                            <th>船名</th>
                                            <th>航次</th>
                                            <th>提单号</th>
                                            <th>日期</th>
                                            <th>备注</th>
                                            <th style="width: 200px;">操作</th>
                                        </tr>
                                    </thead>

                                    <tbody>
                                        @foreach($list as $v)
                                        <tr >
                                            
                                            <td>{{$v->id}}</td>
                                            <td>
                                                {{$v->ship_name}}
                                            </td>
                                            <td>{{$v->ship_line}}</td>

                                            <td>
                                              {{$v->code}} 
                                            </td>
                                            <td>
                                                {{$v->created_at->format('Y-m-d')}}
                                            </td>

                                            <td>{{$v->remark}}</td>

                                           
                                            <td>
                    
                    <a href="{{url('items/'.$v->id.'/edit')}}" class="table-action-btn"><i class="md md-edit"></i>
                    </a>
                    <a href="{{url('items',$v->id)}}" data-method="delete" 
  data-token="{{csrf_token()}}" data-confirm="确定删除吗?"><i class="md md-close"></i>
                    </a>
                                            </td>
                                        </tr>
                                        @endforeach

                                        


                                        

                                    </tbody>
                                </table>
                            </div>
                            {{$list->appends($where)->links()}}
                        </div>

                    </div> <!-- end col -->


                </div>

               

            </div> <!-- end container -->
@endsection        

        
@section('js')
  <!-- Modal-Effect -->
        <script src="{{asset('hrs/plugins/custombox/js/custombox.min.js')}}"></script>
        <script src="{{asset('hrs/plugins/custombox/js/legacy.min.js')}}"></script>
@endsection

